﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entity
{
    /// <summary>
    /// 设计这个类是为了维护用户登录信息，包括
    /// Douban 账号、密码
    /// 用户申请的 API Key、API Key 密钥
    /// 用户授权过的 Access Token、Access Token 密钥
    /// </summary>
    [Serializable]
    public class UserCredential
    {
        private string loginEmail = string.Empty;
        private string password = string.Empty;
        private static string apiKey = "008e42b55339dd9a01aac81ff9ad98ce";
        private static string apiKeySecret = "4117b320f884d067";
        private string requestToken = string.Empty;
        private string requestTokenSecret = string.Empty;
        private string accessToken = string.Empty;
        private string accessTokenSecret = string.Empty;

        public string LoginEmail          //用户登录用的 email address
        { 
            get; 
            set; 
        }

        public string Password           //douban 密码
        {
            get;
            set;
        }

        public static string ApiKey
        {
            get
            {
                return apiKey;
            }
        }
        public static string ApiKeySecret
        {
            get
            {
                return apiKeySecret;
            }
        }
        public string RequestToken
        {
            get
            {
                return requestToken;
            }
            set
            {
                requestToken = value;
            }
        }

        public string RequestTokenSecret
        {
            get
            {
                return requestTokenSecret;
            }
            set
            {
                requestTokenSecret = value;
            }
        }
        public string AccessToken
        {
            get
            {
                return accessToken;
            }
            set
            {
                accessToken = value;
            }
        }
        public string AccessTokenSecret
        {
            get 
            { 
                return accessTokenSecret;
            }
            set 
            { 
                accessTokenSecret = value; 
            }
        }
        
        public UserCredential()
        { 
        }
        public UserCredential(string loginEmail, string password)
        {
            this.LoginEmail = loginEmail;
            this.Password = password;
        }
    }
}
